package com.jyx.refactor.beginner;


/**
 * 租赁
 * author 		jyx
 * email 		jyxsuper@163.com
 * description: Rental
 * Company: 	myzczk
 * datetime: 	2017年9月19日 上午10:29:35
 */
public class Rental {

	private Movie _movie;
	private int _daysRented;
	

	
	/**
	 * 计算租赁金额
	 * @param rental 租赁记录
	 * @return
	 */
	public double calcAmount(){
		return _movie.calcAmount(_daysRented);
	}
	
	/**
	 * 计算积分
	 * @return
	 */
	public int calcIntegral(){
		// add bonus for a two day new release rental 新片租期超过两天，另外增加一积分
		return _movie.calcIntegral(_daysRented);
	}
	
	
	public Rental(Movie _movie, int _daysRented) {
		super();
		this._movie = _movie;
		this._daysRented = _daysRented;
	}

	public Movie get_movie() {
		return _movie;
	}

	public void set_movie(Movie _movie) {
		this._movie = _movie;
	}

	public int get_daysRented() {
		return _daysRented;
	}

	public void set_daysRented(int _daysRented) {
		this._daysRented = _daysRented;
	}
	
	
	
}
